<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Get the list of table names stored in a specific data source</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.odbc-tableprivileges.html">odbc_tableprivileges</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="book.pdo.html">PDO</a></div>
 <div class="up"><a href="ref.uodbc.html">ODBC 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.odbc-tables" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">odbc_tables</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">odbc_tables</span> &mdash; <span class="dc-title">Get the list of table names stored in a specific data source</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.odbc-tables-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">resource</span> <span class="methodname"><strong>odbc_tables</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$connection_id</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$qualifier</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$owner</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$types</code></span>
  ]]]] )</div>

  <p class="para rdfs-comment">
   Lists all tables in the requested range.
  </p>
  <p class="para">
   To support enumeration of qualifiers, owners, and table types,
   the following special semantics for the
   <em><code class="parameter">qualifier</code></em>, <em><code class="parameter">owner</code></em>,
   <em><code class="parameter">name</code></em>, and
   <em><code class="parameter">table_type</code></em> are available:
   <ul class="itemizedlist">
    <li class="listitem">
     <span class="simpara">
      If <em><code class="parameter">qualifier</code></em> is a single percent
      character (%) and <em><code class="parameter">owner</code></em> and
      <em><code class="parameter">name</code></em> are empty strings, then the result
      set contains a list of valid qualifiers for the data
      source. (All columns except the TABLE_QUALIFIER column contain
      NULLs.)
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      If <em><code class="parameter">owner</code></em> is a single percent character
      (%) and <em><code class="parameter">qualifier</code></em> and
      <em><code class="parameter">name</code></em> are empty strings, then the result
      set contains a list of valid owners for the data source. (All
      columns except the TABLE_OWNER column contain
      NULLs.)
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      If <em><code class="parameter">table_type</code></em> is a single percent
      character (%) and <em><code class="parameter">qualifier</code></em>,
      <em><code class="parameter">owner</code></em> and <em><code class="parameter">name</code></em>
      are empty strings, then the result set contains a list of
      valid table types for the data source. (All columns except the
      TABLE_TYPE column contain NULLs.)
     </span>
    </li>
   </ul>
  </p>
 </div>

 
 <div class="refsect1 parameters" id="refsect1-function.odbc-tables-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">connection_id</code></em></dt>

     <dd>

      <p class="para">ODBC 连接标识符，详见
<span class="function"><a href="function.odbc-connect.html" class="function">odbc_connect()</a></span>。</p>
     </dd>

    
    
     <dt>
<em><code class="parameter">qualifier</code></em></dt>

     <dd>

      <p class="para">
       The qualifier.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">owner</code></em></dt>

     <dd>

      <p class="para">
       The owner. Accepts search patterns (&#039;%&#039; to match zero or more
       characters and &#039;_&#039; to match a single character).
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">name</code></em></dt>

     <dd>

      <p class="para">
       The name. Accepts search patterns (&#039;%&#039; to match zero or more
       characters and &#039;_&#039; to match a single character).
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">types</code></em></dt>

     <dd>

      <p class="para">
       If <em><code class="parameter">table_type</code></em> is not an empty string, it
       must contain a list of comma-separated values for the types of
       interest; each value may be enclosed in single quotes (&#039;) or
       unquoted. For example, &quot;&#039;TABLE&#039;,&#039;VIEW&#039;&quot; or &quot;TABLE, VIEW&quot;.  If the
       data source does not support a specified table type,
       <span class="function"><strong>odbc_tables()</strong></span> does not return any results for
       that type.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.odbc-tables-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns an ODBC result identifier containing the information 
   或者在失败时返回 <strong><code>FALSE</code></strong>.
  </p>
  <p class="para">
   The result set has the following columns:
   <ul class="itemizedlist">
    <li class="listitem"><span class="simpara">TABLE_QUALIFIER</span></li>
    <li class="listitem"><span class="simpara">TABLE_OWNER</span></li>
    <li class="listitem"><span class="simpara">TABLE_NAME</span></li>
    <li class="listitem"><span class="simpara">TABLE_TYPE</span></li>
    <li class="listitem"><span class="simpara">REMARKS</span></li>
   </ul>
  </p>
  <p class="simpara">
   The result set is ordered by TABLE_TYPE, TABLE_QUALIFIER,
   TABLE_OWNER and TABLE_NAME.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.odbc-tables-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.odbc-tableprivileges.html" class="function" rel="rdfs-seeAlso">odbc_tableprivileges()</a> - Lists tables and the privileges associated with each table</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.odbc-tableprivileges.html">odbc_tableprivileges</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="book.pdo.html">PDO</a></div>
 <div class="up"><a href="ref.uodbc.html">ODBC 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
